package com.galaxy.device.domain.bo;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.galaxy.common.core.validate.AddGroup;
import com.galaxy.common.core.validate.EditGroup;
import com.galaxy.common.mybatis.core.domain.BaseEntity;
import com.galaxy.device.domain.DeviceLocation;
import com.galaxy.device.domain.vo.DeviceBaseVo;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import java.math.BigDecimal;

/**
 * 设备位置业务对象
 */
@Data
@EqualsAndHashCode(callSuper = true)
@JsonIgnoreProperties(ignoreUnknown = true)
@AutoMapper(target = DeviceLocation.class, reverseConvertGenerate = false)
public class DeviceLocationBo extends BaseEntity {

    /**
     * 主键
     */
    @NotNull(message = "主键不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 设备ID
     */
    @NotNull(message = "设备ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long deviceId;

    /**
     * 位置描述
     */
    @NotBlank(message = "位置描述不能为空", groups = { AddGroup.class, EditGroup.class })
    @Size(min = 0, max = 200, message = "位置描述长度不能超过200个字符")
    private String location;

    /**
     * 详细地址
     */
    @NotBlank(message = "详细地址不能为空", groups = { AddGroup.class, EditGroup.class })
    @Size(min = 0, max = 255, message = "详细地址长度不能超过255个字符")
    private String address;

    /**
     * 纬度
     */
    private BigDecimal latitude;

    /**
     * 经度
     */
    private BigDecimal longitude;

    private Long status;

}
